﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Attribute.aspx.cs" Inherits="WinnerCMS.WebUI.Admin.Category.Attribute" %>

<%@ Register Src="../UC_AdminSelect.ascx" TagName="UC_AdminSelect" TagPrefix="uc1" %>
<!doctype html>
<html>
<head runat="server">
    <title>栏目属性设置</title>
    <meta charset="utf-8" />
    <meta http-equiv="Pragma" content="No-cach" />
    <%: Scripts.Render("~/Scripts/AdminBase") %>
    <%: Styles.Render("~/Content/Bootstrap/css") %>

    <script type="text/javascript">
        var HtmlSavePath = '/Article/';
        $(function ()
        {
        });
        function ShowURL()
        {
            var a = $get("txtFilePrefix").value;
            var b = $get("txtFilePostfix").value;
            var index;
            var list = document.getElementById("RBL_URLStyle").getElementsByTagName("INPUT");

            for (var i = 0; i < list.length; i++)
            {
                if (list[i].checked)
                    index = i;
            }

            if (index == 0)
            {
                $get("show1").innerHTML = "内容页.aspx?ID=内容ID&PageNo=页码";
            }
            if (index == 1)
            {
                $get("show1").innerHTML = HtmlSavePath + "栏目ID/" + a + "内容ID_页码" + b;
            }
            if (index == 2)
            {
                $get("show1").innerHTML = HtmlSavePath + "200706/" + a + "内容ID_页码" + b;
            }
            if (index == 3)
            {
                $get("show1").innerHTML = HtmlSavePath + "200706/12/" + a + "内容ID_页码" + b;
            }
        }
        function ShowCategoryURL()
        {
            var a = $get("txtCategoryFilePrefix").value;
            var b = $get("txtCategoryFilePostfix").value;

            var index;
            var list = document.getElementById("rblCategoryURLStyle").getElementsByTagName("INPUT");

            for (var i = 0; i < list.length; i++)
            {
                if (list[i].checked)
                    index = i;
            }

            if (index == 0)
            {
                $get("show2").innerHTML = "内容页.aspx?CategoryId=栏目ID&PageNo=页码";
            }
            if (index == 1)
            {
                $get("show2").innerHTML = HtmlSavePath + "栏目ID/" + a + "栏目ID_页码" + b;
            }
            if (index == 2)
            {
                $get("show2").innerHTML = HtmlSavePath + "栏目英文名称/" + a + "栏目ID_页码" + b;
            }
        }

        function GetTemplate(controlName)
        {
            $("#dialog-modal").dialog({
                height: 450,
                width: 500,
                title: "网页模板",
                modal: true
            });
            var urlC = $("#dialog-modal-url");
            urlC.attr("src", "../window/GetTemplate.aspx?Control=" + controlName);
            urlC.width(460);
            urlC.height(410);
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <table style="width: 100%;">
        <tr>
            <td>
                &nbsp;
                <asp:ListBox ID="lblCategory" runat="server" Style="height: 600px;" SelectionMode="Multiple">
                </asp:ListBox>
            </td>
            <td valign="top">                <div id="tabs" class="easyui-tabs">
                 <div title="基本属性">   <table id="Tab0" class="TabelGrid" style="width: 100%">
                        <tr>
                            <td style="width: 30px; text-align: center">
                                <asp:CheckBox ID="cbkTemplateFileName" runat="server" Text=" " />
                            </td>
                            <td class="RowTitle">
                                网页模板：
                            </td>
                            <td>
                                <asp:TextBox ID="txtTemplateFileName" runat="server" Width="250px"></asp:TextBox>
                                <input id="Button1" class="btn btn-default" type="button" onclick="GetTemplate();" value="网页模板" />
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 30px; text-align: center">
                                <asp:CheckBox ID="cbkCategoryIntro" runat="server" Text=" " />
                            </td>
                            <td class="RowTitle">
                                栏目介绍：<br />
                                <span style="font-weight: normal">支持HTML</span>
                            </td>
                            <td>
                                <asp:TextBox ID="txtCategoryIntro" runat="server" Height="80px" TextMode="MultiLine"
                                    Width="99%"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 30px; text-align: center">
                                <asp:CheckBox ID="cbkCategoryPic" runat="server" Text=" " />
                            </td>
                            <td class="RowTitle">
                                栏目缩略图：
                            </td>
                            <td>
                                <asp:TextBox ID="txtCategoryPic" runat="server" Height="80px" TextMode="MultiLine" Width="99%"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 30px; text-align: center">
                                <asp:CheckBox ID="cbkCategoryDescription" runat="server" Text=" " />
                            </td>
                            <td class="RowTitle">
                                栏目META网页描述：
                            </td>
                            <td>
                                <asp:TextBox ID="txtCategoryDescription" runat="server" Height="80px" TextMode="MultiLine"
                                    Width="99%"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 30px; text-align: center">
                                <asp:CheckBox ID="cbkCategoryKeyWord" runat="server" Text=" " />
                            </td>
                            <td class="RowTitle">
                                栏目META关键词：
                            </td>
                            <td>
                                <asp:TextBox ID="txtCategoryKeyWord" runat="server" Height="80px" Width="99%" TextMode="MultiLine"></asp:TextBox>
                            </td>
                        </tr>
                    </table></div>
                  <div title="权限设置">   <table id="Tab1" class="TabelGrid" style="width: 100%">
                        <tr>
                            <td style="width: 30px; text-align: center">
                                <asp:CheckBox ID="cbkContentAdmin" runat="server" Text=" " />
                            </td>
                            <td class="RowTitle">
                                内容管理员：
                            </td>
                            <td>
                                <uc1:UC_AdminSelect ID="UC_AdminSelect1" runat="server" Visible="true">
                                </uc1:UC_AdminSelect>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 30px; text-align: center">
                                <asp:CheckBox ID="cbkCategoryAdmin" runat="server" Text=" " />
                            </td>
                            <td class="RowTitle">
                                栏目管理员：
                            </td>
                            <td>
                                <uc1:UC_AdminSelect ID="UC_AdminSelect2" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 30px; text-align: center">
                                <asp:CheckBox ID="cbkOpenGrade" runat="server" Text=" " />
                            </td>
                            <td class="RowTitle">
                                开放栏目设置：
                            </td>
                            <td>
                                <asp:RadioButtonList ID="RBL_OpenGrade" runat="server" RepeatColumns="3" RepeatDirection="Horizontal"
                                    onclick="OpenGradeRemark();">
                                    <asp:ListItem Value="1" Selected="True">开放栏目</asp:ListItem>
                                    <asp:ListItem Value="2">对游客隐藏权限内容</asp:ListItem>
                                    <asp:ListItem Value="3">认证栏目</asp:ListItem>
                                </asp:RadioButtonList>
                                说明：<span id="show3"></span>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 30px; text-align: center">
                                <asp:CheckBox ID="cbkEnableContribute" runat="server" Text=" " />
                            </td>
                            <td class="RowTitle">
                                是否启用投稿：
                            </td>
                            <td>
                                <asp:RadioButtonList ID="RBL_EnableContribute" runat="server" RepeatDirection="Horizontal">
                                    <asp:ListItem Value="1" Selected="True">开启</asp:ListItem>
                                    <asp:ListItem Value="0">关闭</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 30px; text-align: center">
                                <asp:CheckBox ID="cbkEnableComment" runat="server" Text=" " />
                            </td>
                            <td class="RowTitle">
                                是否启用评论：<br />
                                <span style="font-weight: normal">用于录入内容默认值</span>
                            </td>
                            <td>
                                <asp:RadioButtonList ID="RBL_EnableComment" runat="server" RepeatDirection="Horizontal">
                                    <asp:ListItem Value="1" Selected="True">开启</asp:ListItem>
                                    <asp:ListItem Value="0">关闭</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                    </table></div>
                   <div title="URL样式">  <table id="Tab2" class="TabelGrid" style="width: 100%">
                        <tr> <td style="width: 30px; text-align: center">
                                <asp:CheckBox ID="cbkUrlRewrite" runat="server" Text=" " />
                            </td>
                            <td class="RowTitle">
                                Url重写：
                            </td>
                            <td>
                                <asp:RadioButtonList ID="RBL_UrlRewrite" runat="server" RepeatDirection="Horizontal">
                                    <asp:ListItem Value="1" Selected="True">开启</asp:ListItem>
                                    <asp:ListItem Value="0">关闭</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 30px; text-align: center">
                                <asp:CheckBox ID="cbkFilePostfix" runat="server" Text=" " />
                            </td>
                            <td class="RowTitle">
                                内容页静态文件扩展名：
                            </td>
                            <td>
                                <asp:TextBox ID="txtFilePostfix" runat="server">.html</asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 30px; text-align: center">
                                <asp:CheckBox ID="cbkFilePrefix" runat="server" Text=" " />
                            </td>
                            <td class="RowTitle">
                                内容页静态文件前缀：
                            </td>
                            <td>
                                <asp:TextBox ID="txtFilePrefix" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 30px; text-align: center">
                                <asp:CheckBox ID="cbkURLStyle" runat="server" Text=" " />
                            </td>
                            <td class="RowTitle">
                                内容页生成规则：
                            </td>
                            <td>
                                <asp:RadioButtonList ID="RBL_URLStyle" runat="server" RepeatDirection="Horizontal"
                                    onclick="ShowURL();">
                                    <asp:ListItem Value="0" Selected="True">动态</asp:ListItem>
                                    <asp:ListItem Value="1">静态规则一</asp:ListItem>
                                    <asp:ListItem Value="2">静态规则二</asp:ListItem>
                                    <asp:ListItem Value="3">静态规则三</asp:ListItem>
                                </asp:RadioButtonList>
                                样式预览：<span id="show1"></span>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 30px; text-align: center">
                                <asp:CheckBox ID="cbkCategoryFilePostfix" runat="server" Text=" " />
                            </td>
                            <td class="RowTitle">
                                栏目静态页扩展名：
                            </td>
                            <td>
                                <asp:TextBox ID="txtCategoryFilePostfix" runat="server" ToolTip=".html">.html</asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 30px; text-align: center">
                                <asp:CheckBox ID="cbkCategoryFilePrefix" runat="server" Text=" " />
                            </td>
                            <td class="RowTitle">
                                栏目静态页前缀：
                            </td>
                            <td>
                                <asp:TextBox ID="txtCategoryFilePrefix" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 30px; text-align: center">
                                <asp:CheckBox ID="cbkCategoryURLStyle" runat="server" Text=" " />
                            </td>
                            <td class="RowTitle">
                                栏目页生成规则：
                            </td>
                            <td>
                                <asp:RadioButtonList ID="rblCategoryURLStyle" runat="server" RepeatDirection="Horizontal"
                                    onclick="ShowCategoryURL();">
                                    <asp:ListItem Value="0" Selected="True">动态</asp:ListItem>
                                    <asp:ListItem Value="1">静态规则一</asp:ListItem>
                                    <asp:ListItem Value="2">静态规则二</asp:ListItem>
                                    <asp:ListItem Value="3">静态规则三</asp:ListItem>
                                </asp:RadioButtonList>
                                样式预览：<span id="show2"></span>
                            </td>
                        </tr>
                    </table></div>
                </div>
                <asp:Button ID="btnOK" runat="server" Text="确定修改" Cssclass="btn btn-default" OnClick="btnOK_Click" />
            </td>
        </tr>
    </table>
    <script type="text/javascript" language="javascript">        ShowURL(); ShowCategoryURL();</script>
    <div id="dialog-modal">
        <iframe id="dialog-modal-url" frameborder="0" scrolling="no"></iframe>
    </div>
    </form>
</body>
</html>
